﻿using ImageDefine;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ImageToolGrab
{
    public partial class FormSetting : DevExpress.XtraEditors.XtraForm
    {
        ImageTask imageTask;
        ImageToolGrab imageToolGrab;
        public FormSetting()
        {
            InitializeComponent();
        }
        public FormSetting(ImageTask imageTaskIn,ImageToolGrab imageToolGrabIn)
        {
            InitializeComponent();
            imageTask= imageTaskIn;
            imageToolGrab = imageToolGrabIn;
        }

        private void FormSetting_Load(object sender, EventArgs e)
        {
            propertyGridControl1.SelectedObject = imageToolGrab.Setting;

            imageTask.LoadRegeditFile(smartDisplayControl1);
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            imageToolGrab.Run(null, smartDisplayControl1);
        }

        private void simpleButtonLoadImage_Click(object sender, EventArgs e)
        {
            imageTask.LoadRegeditFile(smartDisplayControl1);
        }

        private void smartDisplayControl1_Load(object sender, EventArgs e)
        {

        }
    }
}
